#ifndef _GRAPHICS_CREATURES_H
#define _GRAPHICS_CREATURES_H


#include "DwarfFort/StateListener.h"
#include "DwarfFort/InternalStructures.h"
namespace DwarfFort
{
};


namespace Graphics
{
	class CreatureModel
	{
		DwarfFort::Creature *mOriginalData;
		Ogre::Entity *mCreatureModel;
		Ogre::SceneNode *mContainerNode;
		Ogre::AnimationState *mAnimState;
		Ogre::Real mLastTime;
		int ox,oy,oz,ox1,oy1,oz1;
	public:
		CreatureModel(Ogre::SceneManager *parentManager,DwarfFort::Creature *original);
		~CreatureModel() {}
		void update();
	};

	class CreatureManager : public DwarfFort::StateListener
	{
		std::hacked_vector<DwarfFort::Creature*> *mOriginalCreatures;
		Ogre::SceneManager *mSceneManager;
		std::vector<CreatureModel *> mCreatures;
		void cleanup();
	public:
		CreatureManager(Ogre::SceneManager *sceneManager);
		~CreatureManager();
		
		virtual void stateCreated();
		virtual void stateRemoved() {cleanup();}
		virtual void stateUpdate(int level);
	};

}; // namespace Graphics
#endif